home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(this.active)
- {
- if(move_delay >= 0)
- {
- move_delay--;
- }
- if(this.moveble && move_delay < 0)
- {
- if(c_path <= 0)
- {
- move_direction = -1;
- }
- if(c_path >= move_path)
- {
- move_direction = 1;
- }
- if(move_direction == 1)
- {
- c_path -= move_speed;
- _X = _X + move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y - move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- if(move_direction == -1)
- {
- c_path += move_speed;
- _X = _X - move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y + move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- }
- if(!_root.stoned && pretest == true)
- {
- pretest = false;
- _root.do_sound("sHeart-stone",true);
- rem(1);
- }
- ti = 1;
- while(ti < 6)
- {
- x = _root.bullet._x + _root.bullet.vector.x / ti * 0.9800000000000004;
- y = _root.bullet._y - _root.bullet.vector.y / ti * 0.9800000000000004 - _root.gravity;
- if(this.hitTest(x,y,true))
- {
- if(!_root.stoned)
- {
- pretest = true;
- }
- }
- ti++;
- }
- i = 0;
- while(i < _root.tohit.length)
- {
- if(this.active && _root[_root.tohit[i]].active && this.hitTest(_root[_root.tohit[i]]._x,_root[_root.tohit[i]]._y,true))
- {
- _root.do_sound("sHeart-stone",true);
- rem(2,_root.tohit[i]);
- }
- i++;
- }
- }
- }
-